# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-environs
_pkgname=environs
pkgver=14.2.0
pkgrel=1
pkgdesc='Simplified environment variable parsing.'
arch=('any')
url='https://pypi.org/project/environs/#files'
license=('MIT')
depends=('python' 'python-marshmallow' 'python-dotenv')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('0705365bc07ec4314cab1f177595b3307309667b0cf212e5372b7bfa3f8edfc6c265ded92640cf2d31e459c92a3f117a659d4eb04d9803a161e1980aa72b842a')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

